FUNCTION IP,A

L1=11.2
L2=4.6
A1=FLTARR(232,232)


FOR j=116,230 DO BEGIN
 FOR i=116,230 DO BEGIN
  X1=FLOOR((L2*(i-116)+L1/2)/L1)
  X2=FLOOR((L2*(i-116)+L1/2+1)/L1)
  Y1=FLOOR((L2*(j-116)+L1/2)/L1)
  Y2=FLOOR((L2*(j-116)+L1/2+1)/L1)
  CASE 1 of
   (X1 EQ X2) && (Y1 EQ Y2): BEGIN
     A1[j,i]=A[47+Y1,47+X1]
     END
   (X1 EQ X2) && (Y1 NE Y2): BEGIN
     A1[j,i]=A[47+Y1,47+X1]*(Y2*L1-L2*(j-116))/L2+A[47+Y2,47+X1]*(L2*(j-116+1)-Y2*L1)/L2
     END
   (X1 NE X2) && (Y1 EQ Y2): BEGIN
     A1[j,i]=A[47+Y1,47+X1]*(X2*L1-L2*(i-116))/L2+A[47+Y1,47+X2]*(L2*(i-116+1)-X2*L1)/L2
     END
  ELSE : BEGIN
     A1[j,i]=A[47+Y1,47+X1]*((X2*L1-L2*(i-116))*(Y2*L1-L2*(j-116)))/(L2*L2)+A[47+Y1,47+X2]*((L2*(i-116+1)-X2*L1)*(Y2*L1-L2*(j-116)))/(L2*L2)$
             +A[47+Y2,47+X1]*((X2*L1-L2*(i-116))*(L2*(j-116+1)-Y2*L1))/(L2*L2)+A[47+Y2,47+X2]*((L2*(i-116+1)-X2*L1)*(L2*(j-116+1)-Y2*L1))/(L2*L2)
     END
  ENDCASE
 ENDFOR
ENDFOR  
A1[231,231]=A[94,94]
FOR j=116,230 DO BEGIN
  Y1=FLOOR((L2*(j-116)+L1/2)/L1)
  Y2=FLOOR((L2*(j-116)+L1/2+1)/L1)
  IF Y1 EQ Y2 THEN A1[j,231]=A[47+Y1,94] $
  ELSE A1[j,231]=A[47+Y1,94]*(Y2*L1-L2*(j-116))/L2+A[47+Y2,94]*(L2*(j-116+1)-Y2*L1)/L2
ENDFOR
A1[231,116:230]=A1[116:230,231]
A1[0:115,0:115]=ROTATE(A1[116:231,116:231],2)
A1[116:231,0:115]=ROTATE(A1[116:231,116:231],7)
A1[0:115,116:231]=ROTATE(A1[116:231,116:231],5)

RETURN,A1

END


